//logs.js
var util = require('../../utils/util.js')
Page({
  data: {
    segment:[{"class":"item-sel","title":"知识列表","url":"/pages/college/index","isred":"0"},
    {"class":"item","title":"最新资讯","url":"/pages/faq/index","isred":"1"},
    {"class":"item","title":"在线互动","url":"/pages/online/index","isred":"1"}]
  },
  articalDetail:function(event){
    var atcId = event.currentTarget.dataset.id //文章ID
    //var url = event.currentTarget.dataset.url // 文章地址
    var url = '../articalDetail/index?atcId='+atcId;
     wx.navigateTo({
      url: url
    })

  },
  changeSeg :function(event){
    var url = event.currentTarget.dataset.url
    var isred = event.currentTarget.dataset.isred
    var that = this
    if (isred == "0") {
      wx.switchTab({
        url:url
      })  
    }else{
       wx.redirectTo({
        url:url
      })
    }
  },
  onLoad: function () {
   
  }
})
